<template>
    <div id="app">
        <router-view />
    </div>
</template>


<script lang="ts">
import { h } from "vue";
import { Vue, Component, Prop, Watch } from "vue-property-decorator";
import api from "./api/api";
@Component({ name: "TPL" })
export default class index extends Vue {
    loading = false;
    showUpdateTips() {
        this.$notification["warning"]({
            message: "更新提示",
            description: "系统版本已更新，点击按钮刷新页面",
            btn: (h) =>
                h(
                    "a-button",
                    {
                        props: { type: "primary", size: "small" },
                        on: { click: () => location.reload() },
                    },
                    "更新"
                ),
        });
    }
    async getVersion() {
        console.log("v:" + process.env.version);
        // 获取最新的版本号 如果版本过低 提示刷新
        // const res = await getVersion({ skipCount: 0, maxResultCount: 1 })
        // if (res.items && res.items[0]) {
        //     console.info(process.env)
        //     const firstVersion = res.items[0].version
        //     const versionStr = firstVersion.split('-')[1]
        //     if (process.env && process.env.version) {
        //         document.getElementById('app').dataset.version = process.env.version
        //         if (versionStr && versionStr > process.env.version) {
        //             this.showUpdateTips()
        //         }
        //     }
        // }
    }
    async mounted() {
        

        this.getVersion();
    }
    
}
</script>

<style src="@wangeditor/editor/dist/css/style.css"></style>

<style lang="scss">
.editor {
    z-index: 999999;
    width: 100%;
    min-height: 500px;
    border: 1px solid #8d8d8d;
}

#app {
    height: 100%;
    background-color: rgba(250, 248, 248, 0.98);
}

html {
    margin: 0;
    padding: 0;
}

body {
}

* {
    //box-sizing: border-box;
}

.app-warning-modal {
    .ant-modal-body {
        padding: 0;
    }
    .warning-panel {
        background-color: #fff;
    }
    .warning-title {
        height: 50px;
        line-height: 50px;
        background: #f4f4f4;
        box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0);
        font-weight: bold;
        font-size: 18px;
        color: #282828;
        padding: 0 20px;
    }
    .warning-content {
        padding: 0 20px 20px 20px;
    }
    .content-title {
        font-weight: bold;
        font-size: 16px;
        color: rgba(0, 0, 0, 0.7);
        padding: 10px 0;
    }
    .top-list {
        color: #fff;
        display: inline-flex;
        flex-direction: column;
        justify-content: space-between;
        width: 350px;
        height: 120px;
        margin-right: 20px;
        padding: 20px;
        border-radius: 12px;
    }
    .top-list:last-child {
        margin-right: 0;
    }
    .t-l-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 18px;
        font-weight: bold;
    }
    .t-l-type {
        background-color: #fff;
        height: 28px;
        line-height: 28px;
        padding: 0 20px;
        border-radius: 32px;
        font-size: 16px;
        font-weight: bold;
        letter-spacing: 2px;
    }
    .t-l-bottom {
        font-weight: bold;
        font-size: 26px;
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }
    .t-l-link {
        font-size: 16px;
        font-weight: lighter;
        cursor: pointer;
    }

    .bottom-list {
        width: 350px;
        margin-right: 20px;
        display: inline-flex;
        color: #fff;
        border-radius: 12px;
    }
    .bottom-list:nth-child(4) {
        margin-top: 15px;
    }
    .bottom-list:nth-child(3n) {
        margin-right: 0;
    }
    .b-l-left {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 18px 24px;
    }
    .b-l-right {
        width: 110px;
        height: 110px;
    }
    .b-l-title {
        font-size: 18px;
    }
    .b-l-info {
        font-size: 26px;
        font-weight: bold;
        vertical-align: top;
    }
    .b-l-link {
        font-size: 15px;
        font-weight: lighter;
        margin-left: 10px;
        cursor: pointer;
    }
}
</style>
